package com.h2210c.user.controller;

import com.github.pagehelper.PageInfo;
import com.h2210c.user.fenig.ListCompetitionMemberService;
import com.jiyun.dto.CompetitionDTO;
import com.jiyun.model.Competition;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("jingsai")
public class JingSaiController {
    @Autowired
    ListCompetitionMemberService listCompetitionMemberService;
    @RequestMapping("/findPage")
    public PageInfo<Competition> findPage(@RequestBody CompetitionDTO competitionDTO){
        return listCompetitionMemberService.findPage(competitionDTO);
    }
    @RequestMapping("/jiangsaibyid")
    public Competition jiangsaibyid( @RequestParam("id") Integer id ){
        return listCompetitionMemberService.jiangsaibyid(id);
    }




}
